﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using WcfServiceBomberman.MatchMaking;
using System.Runtime.Serialization;

namespace WcfServiceBomberman.Contracts.Duplex
{
    [ServiceContract(CallbackContract=typeof(IServiceGameWebSiteCallback))]
    interface IServiceGameWebSite
    {
        [OperationContract]
        void register();

        [OperationContract]
        int createPlayer(String player_client_id, String application_id, String player_name);

        // put a player in ranked queue
        [OperationContract]
        bool addPlayerInRankedQueue(UInt32 uid, MatchType type);

        // create a custom game
        [OperationContract]
        bool createCustomGame(MatchType type, CustomTeam[] teams);
    }

    [DataContract]
    public struct CustomTeam
    {
        [DataMemberAttribute]
        UInt16 team_id;
        [DataMemberAttribute]
        UInt32[] uids;
    }
}
